<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }

    .wrap {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-around;
      width: 600px;
      height: 400px;
      border: 1px solid #000;
      margin: 100px auto;
    }

    .wrap>div {
      width: 130px;
      height: 120px;
      background-color: aqua;
      text-align: center;
      line-height: 120px;
    }

    /* 设置几个空的盒子，这样会达到顺序排列的效果，看起来不会受到  justify-content: space-around; 这是一种视觉效果 */
    .wrap>div.empty {
      height: 0;
    }
  </style>
</head>

<body>
  <div class="wrap">
    <div>1</div>
    <div>2</div>
    <div>3</div>
    <div>4</div>
    <div>5</div>
    <div>6</div>
    <div>7</div>
    <div>8</div>
    <div>9</div>
    <div>10</div>
    <div>11</div>
    <div>12</div>
    <div class="empty"></div>
    <div class="empty"></div>
    <div class="empty"></div>
    <div class="empty"></div>
  </div>

</body>

</html>